<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- v-on为元素绑定事件 -->
		<div id="app">
			<input type="button" value="v-on指令" @click="dolt" />
			<input type="button" value="双击事件" @dblclick="dolt"/>
			<span @click="changeFood">{{Food}}</span>
		</div>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script>
			var app = new Vue({
				el:'#app',
				data:{
					Food:"西红柿",
				},
				methods:{
					dolt:function(){
						alert("别点");
					},
					changeFood:function(){
						this.Food += "番茄";
					}
				},
			})
		</script>
	</body>
</html>
